import java.time.LocalDate;

public class 跑步锻炼 {
    public static void main(String[] args) {
        //创建刚开始跑步的时间
        LocalDate startData = LocalDate.of(2000, 1, 1);
        //创建结束跑步的时间对象
        LocalDate endData = LocalDate.of(2020, 10, 2);
        //进行循环判断
        //定义变量记录相差的天数和周一或者是月初的天数。
        int days = 0;
        int monthAndWeek = 0;
        while (!startData.equals(endData)){
            //判断是否是周一或者是月初
            //获取今天是星期几
            int dayOfWeek = startData.getDayOfWeek().getValue();
            //获取今天的是几号
            int dayOfMonth = startData.getDayOfMonth();
            if (dayOfWeek==1|dayOfMonth==1){
                monthAndWeek++;
                startData=startData.plusDays(1);
            } else {
                startData=startData.plusDays(1);
                days++;
            }
        }
        //计算总共跑步的KM
        System.out.println(monthAndWeek*2+days);
    }
}